﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DomainModel.Domain.Model.MessageAssemblyModel;
using DomainModel.Domain.Model.MessageTypeModel;
using NUnit.Framework;

namespace DomainModel.Tests.Domain.Model.MessageAssemblyModel
{
    [TestFixture]
    class when_adding_many_message_types_to_a_message_assembly
    {

        [Test]
        public void each_unique_should_be_added_correctly()
        {
            
            MessageAssembly sut = new MessageAssembly(new MessageAssemblyId(1));

            sut.AddMessageType(new MessageType(new MessageTypeId(1)));
            sut.AddMessageType(new MessageType(new MessageTypeId(2)));
            sut.AddMessageType(new MessageType(new MessageTypeId(3)));
            sut.AddMessageType(new MessageType(new MessageTypeId(3)));
            sut.AddMessageType(new MessageType(new MessageTypeId(4)));

            Assert.True(sut.MessageTypesList.Count == 4, "sut should contain 4 Message Types");

        }

    }
}
